package com.sixth.controller;

import com.sixth.entity.*;
import com.sixth.service.TypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @program: project01
 * @description:
 * @author: 老魏
 * @create: 2021-12-17 21:26
 **/
@RestController
@RequestMapping("type")
public class TypeController {
    @Autowired
    private TypeService typeService;

    public TypeController() {
    }

    //获取分店
    @RequestMapping({"getAllType"})
    public List<Map> getAllType() {
        List<Map> allType = typeService.getAllType();
        return allType;
    }

    @RequestMapping({"getAllType1"})
    public List<Map> getAllType1() {
        List<Map> allType = typeService.getAllType1();
        return allType;
    }

    @RequestMapping({"getAllType2"})
    public List<Map> getAllType2() {
        List<Map> allType = typeService.getAllType2();
        return allType;
    }

    @RequestMapping({"getAllType3"})
    public List<Map> getAllType3() {
        List<Map> allType = typeService.getAllType3();
        return allType;
    }

    @RequestMapping({"getAllType4"})
    public List<Map> getAllType4() {
        List<Map> allType = typeService.getAllType4();
        return allType;
    }

    //获取部门
    @RequestMapping({"getDept"})
    public List<Map> getDept() {
        List<Map> dept = typeService.getDept();
        return dept;
    }

    @RequestMapping({"getDept1"})
    public List<Map> getDept1() {
        List<Map> dept = typeService.getDept1();
        return dept;
    }
    //获取键帽
    @RequestMapping({"getAllKeyCap"})
    public List<Keycap> getAllKeyCap() {
        return typeService.getAllKeyCap();
    }
    //获取键盘颜色
    @RequestMapping({"getAllKeyBoardColor"})
    public List<Keyboardcolor> getAllKeyBoardColor() {
        return typeService.getAllKeyBoardColor();
    }
    //获取轴体类型
    @RequestMapping({"getAllShaftChoose"})
    public List<Shaftchoose> getAllShaftChoose() {
        return typeService.getAllShaftChoose();
    }
    //获取背光颜色
    @RequestMapping({"getAllBacklightColor"})
    public List<Backlightcolor> getAllBacklightColor() {
        return typeService.getAllBacklightColor();
    }
    //获取商品
    @RequestMapping({"getAllCommodity"})
    public List<Goods> getAllCommodity() {
        return typeService.getAllCommodity();
    }

    @RequestMapping({"getAllShop"})
    public List<Branch> getAllShop(Branch branch) {
        List<Branch> allShop = typeService.getAllShop(branch);
        return allShop;
    }
    //获取所有角色
    @RequestMapping({"getAllRole"})
    public List<Map> getAllRole() {
        return typeService.getAllRole();
    }
}
